#ifndef CLIENT_H
#define CLIENT_H

#include <QMainWindow>
#include <QMessageBox>
#include <QLabel>
#include <QSettings>
#include <QTcpSocket>
#include <QHostAddress>
#include <QCryptographicHash>
#include <ipset.h>
#include <softwarestatus.h>
#include <QDebug>

QT_BEGIN_NAMESPACE
namespace Ui { class Client; }
QT_END_NAMESPACE

class Client : public QMainWindow
{
    Q_OBJECT

public:
    Client(QWidget *parent = nullptr);
    ~Client();

    void f_UpdateUI();
    QString f_Md5(QString pwd);
    void f_SetIPAddress(QString IP);
    void f_SetPort(QString Port);
    void f_StartTCPConnection();

signals:
    void signal_status_changed(int);

private slots:
    void on_action_C_triggered();

    void on_ui_BtnSubmit_clicked();

    void slot_check();

    void on_action_IP_I_triggered();

    void slot_error();

    void slot_AcceptData();

    void slot_connected();

    void slot_disconnected();

private:
    Ui::Client *ui;

    QLabel *m_LabelMessage;
    QTcpSocket *m_Socket;
    QString m_IP;
    QString m_Port;

};
#endif // CLIENT_H
